package sctu.edu.java.year2016.team06.chenqiang.day20160606.chapter11_1;

/**
 * Created by XQ on 2016/6/6.
 */
public class Student {
    public static void speak(int m) throws MyException {
        if (m > 1000) {
            throw new MyException(m);
        }
    }

    public static void main(String[] args) {
        Student student = new Student();
        try {
            student.speak(10000);
        } catch (MyException e) {
            System.out.println(e);
        }
    }
}
